package com.zuipin.quartz;

import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

import com.zuipin.service.IProductExtInfoService;
import com.zuipin.util.DateUtils;

@Component
public class CancelSpecialPriceJob extends QuartzJobBean {
	
	@Autowired
	private IProductExtInfoService	productExtInfoService;
	
	private final Logger			log	= Logger.getLogger(CancelSpecialPriceJob.class);
	
	@Override
	protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
		log.info("###取消过期的特价商品，任务开始执行时间：" + DateUtils.getCurrentDateTime() + "###");
		productExtInfoService.cancelExpireSpecialPricePro();
		log.info("###取消过期的特价商品，任务执行成功###");
	}
	
}
